package com.codeoss.framework.view.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.codeoss.framework.context.YunContext;
import com.codeoss.framework.view.component.Component;
import com.codeoss.framework.view.component.Container;
import com.codeoss.framework.view.service.IComponentService;
import com.codeoss.framework.view.service.IContainerService;
import com.codeoss.framework.view.service.store.IComponentServiceStore;

@Service
public class ContainerService extends ComponentService implements IContainerService{
	@Autowired
	private IComponentServiceStore componentServiceStore;
	@Override
	public void processValue(YunContext yunContext,Component component,Map<String,String> paraMap,Map<String,Object> dataMap) {
		// TODO Auto-generated method stub
		Container c = (Container) component;
		List<Component> children = c.getChildren();
		for (Component child : children) {
			IComponentService componentService = componentServiceStore.getComponentService(yunContext,child);
			componentService.processValue(yunContext,child,paraMap,dataMap);
		}
	}
}
